home *** CD-ROM | disk | FTP | other *** search
-
- #define MAX_STRUCTS 5000
-
- // the struct that holds the data
- typedef struct lottonum {
- int set[6];
- char date[20];
- int record_number;
- int reds;
- int whites;
- int blues;
- int evens;
- int odds;
-
- struct lottonum *prev;
- struct lottonum *next;
- } lotto_struct;
-
-
- // the class that does the work
- class lotto_data {
-
- public:
- int number_of_records;
- int user_request;
- char user_input[20];
- lotto_struct *record[MAX_STRUCTS];
-
- lotto_data();
- ~lotto_data();
- bool read_file( void );
- bool check_for_file( void );
- void clear_records( void );
- void clear_user_input( void );
- bool set_struct_file( void );
- bool save_whole_file( void );
- bool update_struct_file( void );
- bool edit_struct_file( void );
- void simple_save( void );
-
- private:
- void get_stats( int );
- void bubble_sort_set( int );
- void clear_structs( void );
-
- };
-
-